package com.guigu.serviceorder.mapper;

import com.guigu.serviceorder.entity.TbOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2020-07-08
 */
public interface TbOrderMapper extends BaseMapper<TbOrder> {

    @Select("SELECT * FROM tb_order t1 \n" +
            "INNER JOIN tb_order_item t2 ON t1.`id`=t2.`order_id` \n" +
            "WHERE t1.`id`= #{orderId}")
    public Map selectOrderAndOrderItem(@Param("orderId") String orderId);
}
